local que_qianggang = fk.CreateSkill {
    name = "que_qianggang",
    anim_type = "control",
    tags = { Skill.Compulsory },
}
Fk:loadTranslationTable {
    ["que_qianggang"] = "抢杠",
    [":que_qianggang"] = "锁定技，其他角色使用非转化非虚拟【杀】结算结束后，你将此【杀】置于武将牌上，称为“杠”；" ..
        "当“杠”大于你的体力时，你可以移去任意“杠”，若你至少移去了一枚“杠”，增加一点体力上限并获得一张基本牌，若你移去了所有“杠”，你额外回复一点体力，摸两张牌。",

    ["zny_gang"] = "杠",

}
que_qianggang:addEffect(fk.CardUseFinished, {
    anim_type = "support",
    can_trigger = function(self, event, target, player, data)
        return player:hasSkill(que_qianggang.name) and target ~= player and not data.card:isVirtual() and
            data.card.trueName == "slash"
    end,
    on_use = function(self, event, target, player, data)
        local room = player.room
        player:addToPile("zny_gang", data.card, true, que_qianggang.name)
        if #player:getPile("zny_gang") > player.hp then
            local cards = room:askToCards(player, {
                min_num = 1,
                max_num = 999,
                include_equip = false,
                pattern = ".|.|.|zny_gang",
                prompt = "抢杠：你需要移去任意张“杠”并获得一张【杀】",
                skill_name = que_qianggang.name,
                expand_pile = "zny_gang",
            })
            if #cards > 0 then
                room:moveCardTo(cards, Card.DiscardPile, nil, fk.ReasonPutIntoDiscardPile, que_qianggang.name, nil, true,
                    player)
                local card = room:getCardsFromPileByRule(".|.|.|.|.|basic", 1, "allPiles")
                if #card > 0 then
                    room:moveCards({
                        ids = card,
                        to = player,
                        toArea = Card.PlayerHand,
                        moveReason = fk.ReasonJustMove,
                        proposer = player,
                        skillName = que_qianggang.name,
                    })
                    room:changeMaxHp(player, 1)
                    if #player:getPile("zny_gang") == 0 then
                        room:recover {
                            who = player,
                            num = 1,
                            recoverBy = player,
                            skillName = que_qianggang.name
                        }
                        player:drawCards(2, que_qianggang.name)
                    end
                end
            end
        end
    end,
})
return que_qianggang
